package com.fandou.base.view.recyclerview;

import android.graphics.Rect;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

/**
 * Created by yzj on 2018/11/5.
 */

public class SpaceItemDecoration extends RecyclerView.ItemDecoration {
	private int space;

	public SpaceItemDecoration(int space) {
		this.space = space;
	}

	@Override
	public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
		outRect.left = space;
		outRect.right = space;
		outRect.top = space;
		outRect.bottom = space;
	}
}
